package cate.common.table.show.sheet;


import cate.common.table.ESheet;
import cate.common.table.show.row.HeadFrameDevRow;
import easy.java.dev.note.NoteClass;

@NoteClass("头像框升级")
public class HeadFrameDevSheet extends ESheet<HeadFrameDevRow> {

    @Override
    public String getSheetName() {
        return "头像框升级";
    }

    @Override
    protected HeadFrameDevRow buildRow() {
        return new HeadFrameDevRow();
    }

    /**
     * 查找配置
     *
     * @param headFrameId
     * @param level
     * @return
     */
    public HeadFrameDevRow findRow(int headFrameId, int level) {
        for (HeadFrameDevRow row : this.getList()) {
            if (headFrameId == row.headFreamId
                    && level >= row.startLevel
                    && level <= row.endLevel) {
                return row;
            }
        }
        return null;
    }
}
